
import java.sql.SQLException;

import controllers.DBController;
import controllers.SubscriberUIP;
import messagesPacks.SubscriberUpdateProfileMessage;
import fit.ActionFixture;
import gui.SubscriberUI;


public class EmailUpdate  extends ActionFixture 

{
	 DBController dbc=null;
	 SubscriberUpdateProfileMessage sup=null;
	 String email; 
	 String ID;
	 int testResult=-1;
	 
	 
public EmailUpdate()
{
	try {
		dbc = new DBController("localhost", 3306, "root","Braude","obl");
	} catch (InstantiationException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	} catch (IllegalAccessException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	} catch (ClassNotFoundException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	} catch (SQLException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
	sup = new SubscriberUpdateProfileMessage("", "3",  "karmiel" ,"","077-2001048");
}
	 
	public void enterEmail(String email)
	{
		sup.setEmail(email);
	}
	 
	public void enterID (String ID)
	{
		sup.setUsername(ID);
	}
	

	public void email_update()
	{
		testResult=dbc.updateUserProfile(null, sup);
		
	}
 
	public int Email ()
	{
		return testResult;

	}

	

}


